package cate.common.table.d;


import cate.common.table.common.ParamSheet;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("背包")
public class GDBag {

    @NoteClass("背包-初始容量配置")
    public static class Capcity {
        @NoteField("数值资源背包de初始容量")
        public static int NUM_RES;

        @NoteField("英雄背包de初始容量")
        public static int HERO;

        @NoteField("装备背包de初始容量")
        public static int EQUIP;

        @NoteField("道具背包de初始容量")
        public static int PROP;

        @NoteField("道具背包仓库de初始容量")
        public static int PROP_STOREHOUSE;

        @NoteField("碎片背包de初始容量")
        public static int HERO_PART;

        @NoteField("灵器背包de初始容量")
        public static int FAIRT;

        @NoteField("灵器碎片背包初始容量")
        public static int FAIRY_PART;

        @NoteField("徽章背包初始容量")
        public static int RUNE;

        @NoteField("厨具")
        public static int KITCHENWARE;

        @NoteField("手办")
        public static int FURNITURE;

        @NoteField("星格")
        public static int SPICE;

        @NoteField("载具")
        public static int VEHICLE;

        @NoteField("宝石")
        public static int GEM;

        @NoteField("铭文")
        public static int INSCRIPTION;

    }

    @NoteClass("背包-扩展参数")
    public static class Expand {
        @NoteField("扩展英雄背包消耗元宝基础值")
        public static String M1_OFFSET;

        @NoteField("扩展英雄背包消耗元宝递增值")
        public static String M1_COEF;

        @NoteField("英雄背包最多扩容次数")
        public static int HERO_BAG_EXPAND_MAX;

        @NoteField("每购买X次，消耗元宝会递增1次")
        public static int BUY_N;

        @NoteField("一次购买扩展英雄背包格子数")
        public static int ADD_N;

        @NoteField("装备转换每日最大次数")
        public static int EQUIP_TRANSFORM_DAILY_MAX_COUNT;
    }

    /**
     * 读取excel中配置的参数
     */
    public static void initialize(ParamSheet paramSheet) {
        Capcity.NUM_RES = 999;
        Capcity.HERO = GDParamTool.getInt(paramSheet, 426, 30);
        Capcity.EQUIP = GDParamTool.getInt(paramSheet, 427, 30);
        Capcity.PROP = GDParamTool.getInt(paramSheet, 428, 30);
        Capcity.PROP_STOREHOUSE = GDParamTool.getInt(paramSheet,462,20);
        Capcity.HERO_PART = GDParamTool.getInt(paramSheet, 429, 30);
        Capcity.KITCHENWARE = GDParamTool.getInt(paramSheet, 431, 999);
        Capcity.FAIRT = GDParamTool.getInt(paramSheet, 433, 999);
        Capcity.RUNE = GDParamTool.getInt(paramSheet, 434, 999);
        Capcity.FURNITURE = GDParamTool.getInt(paramSheet, 436, 999);
        Capcity.SPICE = GDParamTool.getInt(paramSheet, 460, 999);
        Capcity.VEHICLE = GDParamTool.getInt(paramSheet, 462, 999);
        Capcity.FAIRY_PART = GDParamTool.getInt(paramSheet, 461, 999);
        Capcity.GEM = GDParamTool.getInt(paramSheet, 160002, 999);
        Capcity.INSCRIPTION = GDParamTool.getInt(paramSheet, 15003, 999);

        Expand.M1_OFFSET = GDParamTool.getString(paramSheet, 421, "0:2:150");
        Expand.M1_COEF = GDParamTool.getString(paramSheet, 422, "0:2:50");
        Expand.HERO_BAG_EXPAND_MAX = GDParamTool.getInt(paramSheet, 423, 100);
        Expand.BUY_N = GDParamTool.getInt(paramSheet, 424, 1);
        Expand.ADD_N = GDParamTool.getInt(paramSheet, 425, 5);
        Expand.EQUIP_TRANSFORM_DAILY_MAX_COUNT = GDParamTool.getInt(paramSheet, 474, 99);
    }
}
